This application is based on and claims priority under 35 U.S.C. xc2xa7 119 with respect to a Japanese Patent Applications 2001-295147, filed on Sep. 26, 2001, the entire content of which is incorporated herein by reference.
This invention generally relates to a signal processing apparatus for binary processing a sensor signal. More particularly, this invention pertains to a signal processing apparatus for setting a threshold value with reference to a peak value of a sensor signal and a bottom value thereof and for outputting a binary signal based upon the threshold value.
One of known sensor signal processing apparatuses is disclosed in a Japanese Patent Laid-Open Publication No.6(1994)-300584. The sensor signal processing apparatus functions for holding a peak value of an output signal from a sensor and for holding a bottom value thereof. A threshold value, which is set based upon the aforementioned peak value and the aforementioned bottom value, is compared with the output signal from the sensor. The sensor signal processing apparatus therefore outputs a binary signal in accordance with the size relationship between the threshold value and the output signal from the sensor.
Further, an apparatus, in which the threshold value is set based upon the peak value of the output signal from the sensor and the bottom value thereof, is disclosed in another Japanese Patent Laid-Open Publication Hei.10 (1998)-73454. According to the apparatus disclosed in this Japanese Patent Laid-Open Publication, a voltage that is proportionally related to a magnetic field is employed as a sensor signal. A threshold value is set by multiplying a peak value of the voltage by a fixed percentage. The other threshold value is also set by multiplying a bottom value of the voltage by a fixed percentage. Therefore, a binary signal of the sensor signal can be generated based upon the two threshold values.
More specifically, according to the apparatus disclosed in this Japanese Patent Laid-Open Publication, an upper threshold value is set by multiplying the peak value of the voltage (i.e. the sensor signal) by a fixed percentage and a lower threshold value is also set by multiplying the bottom value of the voltage (i.e. the sensor signal) by a fixed percentage. Therefore, a binary processing of the sensor signal can be performed based upon the upper and lower threshold values.
However, a following problem to be overcome may occur according to the above-described binary processing method of the sensor signal. As illustrated in FIG. 9, the sensor signal may be fluctuated within a range between the upper and lower threshold values for a predetermined period of time after period of times T1 and T2 due to a position relationship between the rotated rotor and the sensor or an inaccuracy for manufacturing the teeth or slits provided with the rotor. In this case, a wave shape of the sensor signal may not be able to be generated while the sensor signal has been fluctuated within the range between the upper and lower threshold values so that a pulse failure may occur. It may result in that an accurate binary signal may not be able to be outputted based upon the sensor signal fluctuating within the range between the upper and lower threshold values.
Accordingly, it is still susceptible of certain improvements with respect to providing an improved signal processing apparatus for outputting an accurate binary signal without causing the pulse failure.
A signal processing apparatus in the present invention comprises a bottom value memorizing means for memorizing a bottom value of a sensor signal, a peak value memorizing means for memorizing a peak value of a sensor signal, a reference value calculating means for calculating a reference value_based upon the bottom value and the peak value, a deviation calculating means for calculating a first deviation between the reference value and the bottom value and a second deviation between the reference value and the peak value, a threshold value setting means for calculating a first average value of the first deviation for a predetermined period of time and a second average value of the second deviation for the predetermined period of time, and for setting a first threshold value based upon the first average value multiplied by a first ratio and a second threshold value based upon the second average value multiplied by the first ratio, and an outputting means for outputting a binary signal by comparing the sensor signal with the first threshold value and by comparing the sensor signal with the second threshold value.
The first threshold value is renewed by a first value calculated by multiplying a minimum value of the first deviation for the predetermined period of time by a second ratio when the minimum value of the first deviation is equal to or smaller than the first threshold value and the second threshold value is renewed by a second value calculated by multiplying a minimum value of the second deviation for the predetermined period of time by the second ratio when the minimum value of the second deviation is equal to or smaller than the second threshold value, and the outputting means outputs the binary signal based upon the renewed first threshold value when the minimum value of the first deviation is equal to or smaller than the first threshold value and the outputting means outputs the binary signal based upon the renewed second threshold value when the minimum value of the second deviation is equal to or smaller than the second threshold value.